<!-- Copyright (c) 2022 渝州大数据实验室
 *
 * Lanius is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *
 *     http://license.coscl.org.cn/MulanPSL2
 *
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 -->
<!-- 
* @desc:文字提示组件
* @fileName:LaniusTooltip.vue
* @author:zoujunjie
* @date:2022-05-18
* 用法：用法和 Element Plus Tooltip 类似
!-->
<template>
  <el-tooltip
    :content="content"
    :enterable="false"
    :hide-after="0"
    :placement="placement"
    transition=""
    :disabled="disabled"
  >
    <slot />
  </el-tooltip>
</template>

<script lang="ts" setup>
import { toRefs } from "vue";

interface Props {
  content: string;
  disabled?: boolean;
  placement?: string;
}

const props = withDefaults(defineProps<Props>(), {
  disabled: false,
  placement: "top",
});

const { content, disabled, placement } = toRefs(props);
</script>

<style lang="scss"></style>
